import Vue from "vue";
import VueI18n from "vue-i18n";
import ElementUI from 'element-ui'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
Vue.use(VueI18n);

const i18n = new VueI18n({
  locale: "zh", // set locale
  messages: {
    en: {
      menu: {
        home: "Home",
        goods: "Goods Manage",
        params: "Specifition",
      },
      ...enLocale
    },
    zh: {
      menu: {
        home: "首页",
        goods: "商品管理",
        params: "规格参数",
      },
      ...zhLocale
    },
  },
});

// Vue.use(Element, {
//   i18n: (key, value) => i18n.t(key, value)
// })
export default  i18n ;
